package com.freedom.ums.member.application.service.cmd;

import com.freedom.ums.member.application.converter.MemberConverter;
import com.freedom.ums.member.domain.service.MemberService;
import com.freedom.ums.member.infrastructure.persistence.pojo.command.admin.AdminMemberStatusCommand;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@AllArgsConstructor
public class MemberCmdService {

    private final MemberService memberService;

    private final MemberConverter memberConverter;

    @Transactional(rollbackFor = Exception.class)
    public Boolean modifyStatus(AdminMemberStatusCommand memberStatusCommand) {
        memberService.modifyStatus(memberStatusCommand.getMemberIds(), memberStatusCommand.getStatus());
        return Boolean.TRUE;
    }
}
